package com.aop;

import org.aspectj.lang.JoinPoint;
import org.aspectj.lang.annotation.AfterReturning;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Before;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.stereotype.Component;

@Aspect
@Component
public class Red {


	@Pointcut("execution(* com.aop.Computer.*(..))")
	public void pointcut1() {
	};

	@Before("pointcut1()")
	public void comp(JoinPoint joinPoint) {
		String name = joinPoint.getSignature().getName();
		System.out.println("方法名：》"+name);
	}
}
